package cn.pomelo.secondskill.service;

import cn.pomelo.secondskill.exception.SecondsKillException;
import cn.pomelo.secondskill.model.Goods;
import cn.pomelo.secondskill.model.Orders;

import java.util.List;

public interface GoodsService {


    List<Goods> findAll();

    int deleteByPrimaryKey(Integer id);

    int insert(Goods record);

    int insertSelective(Goods record);

    Goods selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Goods record);

    int updateByPrimaryKey(Goods record);

    String selectGoodsNameById(Integer id);

    Orders doScKill(Integer goodsId, Integer userId, Integer state) throws SecondsKillException;

//    int kill(Orders or);
}
